<?php
include '../connect/common_start.php';

if (isset($_REQUEST['mem_id'])) {
	$mem_id=$_REQUEST['mem_id'];
	if (isset($_REQUEST['content'])) {
		$content=$_REQUEST['content'];
		$yy=$_REQUEST['yyPublic'];
		$mm=$_REQUEST['mmPublic'];
		$dd=$_REQUEST['ddPublic'];
		$title=$_REQUEST['title'];
		$price=$_REQUEST['price'];
		$link=$_REQUEST['link'];
		$image=$_REQUEST['image'];
		
		//$date = date_create($yy.'-'.$mm.'-'.$dd);
		//$date= date_format($date, 'Y-m-d');
		$date = $year.'-'.$month.'-'.$day;
		//echo $date;
		$sql="INSERT INTO `post` (`id_store`, `date`, `title`, `price`, `link`, `image`, `content`, `create_day`, `status`, `likes`, `comments`, `type`) VALUES ('$mem_id', '$date', '$title', '$price', '$link', '$image', '$content', NOW(), '0','0','0' ,'2')";
		//echo $sql;
		$result=mysql_query($sql);		
		echo mysql_affected_rows();
	}
}


include '../connect/common_end.php';
?>